qcc=qcc
if [ "$1" != "" ]; then
    qcc=$1
fi

echo qcc: $qcc
echo cur: `pwd`

for i in `ls *.pcc`; do
    name=${i:0:-4}
    echo $qcc $i
    $qcc $i 1>$name.out.txt 2>$name.warning.txt
    if [ "`cat $name.warning.txt`" == "" ]; then
        \rm $name.warning.txt
    fi
done

for i in `ls *.py`; do
    name=${i:0:-3}
    $qcc $i 1>$name.out.txt 2>$name.warning.txt
    if [ "`cat $name.warning.txt`" == "" ]; then
        \rm $name.warning.txt
    fi
done